import request from '@/utils/request'

// 获取所有组织详情
export function getAllDepartrment() {
  return request({
    url: '/company/department'
  })
}

// 新增所有组织详情
export function addDepartrment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 删除组织详情
export function delDepartrment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 获取单个组织详情
export function getDepartrment(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 修改单个组织详情
export function updateDepartrment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 简单组织详情
export function getSimple() {
  return request({
    url: '/sys/user/simple'
  })
}
